home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-2.iso / extra / helpful.zip / term < prev    next >
Text File  |  1995-08-21  |  90KB  |  2,620 lines

  1.   TERM HOWTO
  2.   Patrick Reijnen patrickr@bart.nl
  3.   v1.2, 15 July 1995
  4.  
  5.   1.  Legal Information
  6.  
  7.  
  8.  
  9.   1.1.  Copyright statement
  10.  
  11.   This document may be distributed freely as a whole in any form and
  12.   free of charge. Parts of this document may be distributed, provided
  13.   that this copyright message is included and the reader is informed
  14.   that this is not the full HOWTO document. Furthermore, there is to be
  15.   a pointer as to where the full document can be obtained. Specifically,
  16.   it may be included in commercial distributions, without prior consent.
  17.   However, I would like to be informed of such usage.
  18.  
  19.   This HOWTO may be translated into any language, whatsoever, provided
  20.   that you leave this copyright statement and the disclaimer intact, and
  21.   that a notice is appended stating who translated the document.
  22.  
  23.  
  24.   1.2.  DISCLAIMER
  25.  
  26.  
  27.   While I have tried to include the most correct and up-to-date
  28.   information available, I cannot guarantee that usage of the
  29.   information in this document does not result in loss of data. I
  30.   provide NO WARRANTY about the information in this HOWTO and I cannot
  31.   be made liable for any consequences for any damage resulting from
  32.   using information in this HOWTO.
  33.  
  34.  
  35.   2.  Introduction
  36.  
  37.  
  38.  
  39.   2.1.  This Document
  40.  
  41.  
  42.  
  43.   This HOWTO attempts to clear up some of the confusion of using TERM,
  44.   Michael O'Reilly's remarkable program that allows you to multiplex
  45.   your serial line and set up a network connection.  By and large, the
  46.   documents that come with TERM are quite good, and this HOWTO is not
  47.   intended to replace them. The intention of this document is to give
  48.   some background on how TERM works and detail the steps in getting some
  49.   of the more common networking services working under TERM. It should
  50.   be emphasized that this document does not cover everything there is to
  51.   know about TERM. After reading it, the TERM manual pages should be
  52.   read, since they include information not contained here.
  53.  
  54.  
  55.   2.2.  What is TERM?
  56.  
  57.   TERM is a program, written by Michael O'Reilly (michael@iinet.com.au)
  58.   and maintained by Bill Riemers (bcr@physics.purdue.edu), that is run
  59.   over a serial line to allow multiple connections to operate
  60.   concurrently - i.e. you may be down-load a file via your modem while
  61.   working on a (different) remote system via the same modem connection.
  62.   TERM can also be used to open up X client windows over a serial
  63.   connection.  Through the tredir utility and the tudpredir utility TERM
  64.   can provide almost all of the ``traditional'' TCP/IP and UDP network
  65.   services: mail, news, ftp, telnet, xarchie, etc.  In a sense, TERM is
  66.   very much like other serial protocols such as SLIP or PPP. TERM's
  67.   advantage is that it can be run entirely from user space, requiring no
  68.   support from system or network administrators.
  69.  
  70.   Unlike SLIP or PPP, your machine does not have its own IP address. All
  71.   incoming traffic must be addressed to your remote host, and it will be
  72.   redirected to your local computer by TERM.
  73.  
  74.  
  75.   3.  How TERM works
  76.  
  77.  
  78.   Before experimenting with TERM it is strongly advised to first read
  79.   this complete chapter and the INSTALLATION file provided with the
  80.   package. Also take a look at the manual pages linecheck, (term)test
  81.   and TERM. This will help you to work easier and faster.
  82.  
  83.  
  84.   3.1.  Nomenclature
  85.  
  86.  
  87.   I assume you are dialling a system through some sort of terminal
  88.   server. I use the terms local and remote to refer to the home and
  89.   network connected systems respectively (unless I use them to mean
  90.   something else :-).
  91.  
  92.   TERM provides the local machine, which has no network connection, but
  93.   is connected, via a serial line, to a remote machine which is in turn
  94.   connected to a network with network services. Let us look at how a
  95.   machine with a user invokes a program, like ftp or telnet, that
  96.   requests a network service. What these programs do is make a system
  97.   call requesting network services. The operating system then obtains
  98.   these services via its network interface (e.g. it sends and receives
  99.   packets over the ethernet). SLIP and PPP do exactly this, by
  100.   converting your modem line into a network interface, which is in
  101.   principle no different from an ethernet. The downside of this is that
  102.   these protocols make the modem-connected machine part of the network,
  103.   just like any other machine. This implies all the administrative
  104.   burdens associated with being a network node (more actually, since the
  105.   modem link must also be administered).
  106.  
  107.   In the absence of a network connection like SLIP or PPP, what does one
  108.   typically do? Well, you dial your network connected machine, read your
  109.   mail, your news etc; if you need a file, you first transfer it to the
  110.   remote machine and then download it to your local machine using kermit
  111.   or some other communication program. This is a bit of a pain,
  112.   especially since you can only really do one thing at a time that uses
  113.   your modem link.  The idea behind TERM is basically to automate and
  114.   multiplex this process. TERM is invoked on both the local and remote
  115.   machines, and the two processes communicate with one another over the
  116.   modem line. When you need a network service, you make a request to the
  117.   local TERM daemon, which forwards the request to the TERM daemon on
  118.   the remote, network-connected, machine. The result is then returned
  119.   over the modem line.
  120.  
  121.   To be more concrete, say you want to retrieve a file by ftp.  First
  122.   you need a version of ftp that can speak to TERM. You invoke this
  123.   termftp as you do a regular ftp, say termftp nethost.gov, but this
  124.   special version makes its network request to the local TERM daemon
  125.   instead of the kernel. The local TERM forwards this request, over the
  126.   modem line, to the remote TERM, which opens an ftp connection to
  127.   nethost.gov, and transmits the data back over the modem link. TERM is
  128.   smart enough to have many different things going on at once; so you
  129.   can have several different network sessions using the same modem link,
  130.   e.g. you can be logged into another distant host via termtelnet while
  131.   the termftp transfer is going on.
  132.  
  133.   If this is too abstract (or unclear) do not worry; the important piece
  134.   of information to get out of this section is that there are two copies
  135.   of TERM running, one on each end of the modem link.
  136.  
  137.  
  138.   4.  Setting Things Up
  139.  
  140.  
  141.  
  142.   4.1.  What has to be available
  143.  
  144.  
  145.   Before you start building and using TERM you have to make sure that
  146.   you have built TCP/IP support into the kernel. Furthermore, make sure
  147.   that the TCP/IP loopback interface is activated. When this is the case
  148.   you can go on with the rest of this section.
  149.  
  150.  
  151.   4.2.  Explanation of concepts
  152.  
  153.  
  154.   In newer TERM version two new concepts have entered TERM. These two
  155.   concepts will be explained in the next two subsections.
  156.  
  157.  
  158.   4.2.1.  Sharing
  159.  
  160.  
  161.   Starting with version 1.16 the concept of sharing the TERM connection
  162.   with other users has entered TERM. This means that when you enable
  163.   shared features, other people can use the same TERM connection you are
  164.   using, i.e. when you are working on your remote machine via your TERM
  165.   connection (say, from your local machine you used trsh to get in)
  166.   another person on your local machine can use the same TERM connection
  167.   at the same time to ftp a file to his login on your local machine from
  168.   an ftp site somewhere in the world.
  169.  
  170.   When you disable shared features (i.e. you execute TERM in private
  171.   mode) you and only you (we do not count root :-) can use the TERM
  172.   connection.
  173.  
  174.   Of course, you only need to install shared TERM at the end at which
  175.   you want to allow people to use the same TERM connection you are
  176.   using. So, if other people have a login on your local machine and they
  177.   want to use it from somewhere on your remote network you enable shared
  178.   features on the remote end of your TERM connection. In this way all
  179.   these people can login on your machine at the same time sharing the
  180.   same TERM connection with each other and with you. (NOTE: the first
  181.   example needed shared features to be enabled at the local end of the
  182.   TERM connection).
  183.  
  184.   NOTE for installation as root: When you install TERM as root you have
  185.   to create a 'term' group first (before compilation) with no member by
  186.   adding the following line in '/etc/group':
  187.  
  188.  
  189.     term::16:root
  190.  
  191.  
  192.  
  193.   or any other unused GID than 16 when 16 is already in use.
  194.  
  195.   After compilation and installation make TERM and its clients SGID
  196.   'term':
  197.  
  198.  
  199.     chgrp term <term_client>
  200.     chmod g+s <term_client>
  201.  
  202.  
  203.  
  204.   Also any other program that you make TERM-aware must be made SGID
  205.   'term'.
  206.  
  207.  
  208.   4.2.2.  Full TERM networking
  209.  
  210.  
  211.   Starting with TERM version 2.0.0 the statement full TERM networking is
  212.   used. When your only connection with the outside world is a TERM
  213.   connection, you have a full TERM network and you should build TERM
  214.   with full TERM networking. In this case in the shared directory a file
  215.   called termnet is placed. This tells TERM that your only connection to
  216.   the outside world is via TERM.
  217.  
  218.   When you also have some other type of network connection beside your
  219.   TERM connection TERM-aware programs first try to fulfil their job
  220.   using this network connection. When this fails TERM is invoked and it
  221.   is tried to fulfil the job via the TERM connection. To make this more
  222.   clear now an example is given in which TERM-aware telnet is used. This
  223.   telnet should work both with and without TERM.
  224.  
  225.  
  226.     telnet localhost
  227.  
  228.  
  229.  
  230.   does not use TERM to connect, but
  231.  
  232.  
  233.     telnet zeus.cs.kun.nl
  234.  
  235.  
  236.  
  237.   will use TERM only if you do not have some other type of network
  238.   connection.
  239.  
  240.   Full TERM networking also means to lie about the host name, and say it
  241.   is the remote host instead.  Furthermore, it causes bind(0) to always
  242.   act on the remote host.  In essence it makes many programs unusable
  243.   when they are not going through TERM, while TERM is running.
  244.   Unfortunately, most UDP programs and daemons will not work with TERM
  245.   without these nasty tricks.
  246.  
  247.  
  248.   4.3.  Build TERM
  249.  
  250.  
  251.   When you are lucky, this should just involve a make. Most probably
  252.   however, you need to do more. Due to new features in newer versions of
  253.   TERM it is now a bit more complicated to create your TERM binary. A
  254.   couple of ways can be followed to obtain your binary.
  255.  
  256.   To cover all these ways TERM can be built this section will be split
  257.   into three parts:
  258.  
  259.  
  260.   1. Build TERM, versions 2.0.0 and higher
  261.  
  262.   2. Build TERM, versions 1.16 up to 1.19
  263.  
  264.  
  265.   3. Build TERM up to version 1.15
  266.  
  267.  
  268.   4.3.1.  Build TERM, versions 2.0.0 and higher
  269.  
  270.  
  271.   First, make sure you have read the section about 'full TERM
  272.   networking' above.
  273.  
  274.   For TERM versions 2.0.0 and higher there are many ways to build the
  275.   TERM binary and the clients. All of these can be done both by root and
  276.   by ordinary user:
  277.  
  278.  
  279.   1. Build TERM in private mode without full TERM networking
  280.  
  281.   2. Build TERM in private mode with full TERM networking
  282.  
  283.   3. Build TERM in shared mode without full TERM networking
  284.  
  285.   4. Build TERM in shared mode with full TERM networking
  286.  
  287.   In these versions of TERM a new way for compilation has entered TERM
  288.   using the script configure. When configure is run it checks on what
  289.   operating system you are trying to install TERM, whether the source
  290.   directory is available or not, and if any runtime options are set.
  291.   According to the things found configure then creates a Makefile using
  292.   Makefile.in which is provided in the TERM package.
  293.  
  294.   Two of the more important options to configure are --root and --user
  295.   which state whether TERM will be installed by root or an ordinary
  296.   user. Other options can be used to install TERM the way you want (non-
  297.   standard paths for example).
  298.  
  299.  
  300.   1. Build TERM in private mode without full TERM networking.
  301.  
  302.      To build TERM in this way you need to execute the following
  303.      commands (both for root and ordinary user):
  304.  
  305.  
  306.        ./configure --root  OR --user
  307.        make install installman
  308.  
  309.  
  310.  
  311.   This builds the binaries and installs these binaries and the manual
  312.   pages.
  313.  
  314.   2. Build TERM in private mode with full TERM networking.
  315.  
  316.      To build TERM in this way you need to execute the following
  317.      commands (both for root and ordinary user):
  318.  
  319.  
  320.        ./configure --root  OR --user
  321.        make installnet installman
  322.  
  323.  
  324.  
  325.   This builds the binaries and installs these binaries and the manual
  326.   pages.
  327.  
  328.   3. Build TERM in shared mode without full TERM networking.
  329.  
  330.      To build TERM in this way you need to execute the following
  331.      commands (both for root and ordinary user):
  332.  
  333.  
  334.        ./configure --root  OR --user
  335.        make share installman
  336.  
  337.  
  338.  
  339.   This builds the binaries and installs these binaries and the manual
  340.   pages.
  341.  
  342.   4. Build TERM in shared mode with full TERM networking.
  343.  
  344.      To build TERM in this way you need to execute the following
  345.      commands (both for root and ordinary user):
  346.  
  347.  
  348.  
  349.        ./configure --root  OR --user
  350.        make share installnet installman
  351.  
  352.  
  353.  
  354.   This builds the binaries and installs these binaries and the manual
  355.   pages.
  356.  
  357.  
  358.   4.3.2.  Build TERM, versions 1.16 up to 1.19
  359.  
  360.  
  361.   To build these versions of TERM you can now choose one of the
  362.   following ways:
  363.  
  364.  
  365.   1. As an ordinary user, build TERM in private mode
  366.  
  367.   2. As an ordinary user, build TERM in shared mode
  368.  
  369.   3. As root, build TERM in private mode
  370.  
  371.   4. As root, build TERM in shared mode
  372.  
  373.   Below, it will be explained how to enable/disable shared features
  374.   during the compilation of TERM.
  375.  
  376.  
  377.   1. You are an ordinary user (no root access) and you do NOT want to
  378.      SHARE the TERM connection with other users.
  379.  
  380.      As a user who does not want to share the TERM connection with other
  381.      users you should do the following to build TERM:
  382.  
  383.  
  384.        make DO=install OS-type
  385.        make installman
  386.  
  387.  
  388.  
  389.   After this TERM, its clients and the manual pages are built and
  390.   installed.
  391.  
  392.   Furthermore, you need to create a directory '$HOME/.term'. This is the
  393.   directory in which TERM will look for its 'termrc' file.
  394.  
  395.   2. You are an ordinary user (no root access) and you want to SHARE the
  396.      TERM connection with other users.
  397.      As a user who wants to share the TERM connection you should do the
  398.      following:
  399.  
  400.  
  401.        make DO=installshare USERSHARE=$HOME/term OS-type
  402.        make installman
  403.  
  404.  
  405.  
  406.   After this TERM, its clients and the manual pages are built and
  407.   installed.
  408.  
  409.   Furthermore, you will have a directory '$HOME/term' (default) with
  410.   permissions 'drwxrwxr-x'. In this directory you will find at least the
  411.   socket used by TERM for its connection ('tmp/private/socket=').
  412.  
  413.   3. You are root and you do NOT want to SHARE the TERM connection with
  414.      other users.
  415.  
  416.      As root who does not want the TERM connection to be shareable you
  417.      should do the following to build TERM:
  418.  
  419.  
  420.        make DO=install OS-type
  421.        make installman
  422.  
  423.  
  424.  
  425.   After this TERM, its clients and the manual pages are built and
  426.   installed.
  427.  
  428.   Furthermore, you now have a directory called '/usr/local/lib/term'
  429.   (default) with permissions 'drwxr-xr-x'. In this directory you will at
  430.   least find the socket used by TERM for its connection
  431.   ('tmp/private/socket=').
  432.  
  433.   4. You are root and want to SHARE the TERM connection.
  434.  
  435.      First, make sure you have read the section about 'sharing' above.
  436.  
  437.      As root who wants to share the TERM connection you should do the
  438.      following:
  439.  
  440.  
  441.        make DO=installshare OS-type
  442.        make installman
  443.  
  444.  
  445.  
  446.   After this TERM, its clients and the manual pages are built and
  447.   installed.
  448.  
  449.   Furthermore, you now have a directory called '/usr/local/lib/term'
  450.   (default) owned by group TERM and with permissions 'drwxrwxr-x'. In
  451.   this directory you will at least find the socket used by TERM for its
  452.   connection ('tmp/private/socket=').
  453.  
  454.  
  455.   4.3.3.  Build TERM up to version 1.15
  456.  
  457.  
  458.   For these versions of TERM building should invoke no more than the
  459.   commands
  460.  
  461.  
  462.  
  463.     make DO=install OS-type
  464.     make installman
  465.  
  466.  
  467.  
  468.   You will find TERM, its clients and the manual pages nicely built and
  469.   installed and ready for use after this.
  470.  
  471.   Furthermore, you need to create a directory '$HOME/term'. This
  472.   directory TERM will use to look for its termrc file.
  473.  
  474.   The only thing you may want to do is change some of the paths in the
  475.   Makefile or change some of the compiler flags.
  476.  
  477.  
  478.   4.4.  client.a, libtermnet.a, libtermnet.sa, libtermnet.so
  479.  
  480.  
  481.   With TERM a library with functions for TERM clients is provided.
  482.  
  483.   Up to version 1.16 this library was called client.a. During
  484.   compilation of TERM this library was built and then used during the
  485.   compilation of the TERM clients. It was not installed in another
  486.   directory.
  487.  
  488.   Starting with version 1.16 the name of the library is changed to
  489.   libtermnet.a. Up to version 1.19 this library is created in the TERM
  490.   directory and then used during compilation of the TERM clients. It is
  491.   not installed in another directory.
  492.  
  493.   Starting with version 2.0.0, beside libtermnet.a also libtermnet.so
  494.   and libtermnet.sa (shared library and exported initialized library
  495.   data) are created during compilation of the TERM package. During the
  496.   installation of all the parts of the package also these three library
  497.   files are installed in the directory '/usr/local/lib' (default). Then
  498.   a link is made from libtermnet.so.2 to libtermnet.so.2.x.x. Finally,
  499.   ldconfig is run to create the necessary links and cache (for use by
  500.   the run-time linker, ld.so) to the most recent shared libraries found
  501.   in the directories specified on the command line, in the file
  502.   '/etc/ld.so.conf', and in the trusted directories ('/usr/lib' and
  503.   '/lib'). If the installation is done correctly the three library files
  504.   can now be used by TERM clients which are built with dynamic instead
  505.   of static libraries. Also, these libraries can now be used to port
  506.   your own software to make it TERM aware (see belo!  w).
  507.  
  508.  
  509.   4.5.  Setting environment variables
  510.  
  511.  
  512.   TERM knows a couple of environment variables which can be set by
  513.   users. The first three of those that I will explain are
  514.  
  515.  
  516.   o  TERMDIR
  517.  
  518.   o  TERMSHARE
  519.  
  520.   o  TERMMODE
  521.  
  522.   By setting these variables you can control the way TERM is run.
  523.  
  524.   For TERM versions up to 1.15 only the variable TERMDIR is important
  525.   (these versions do not know the shared mode). For these versions
  526.   TERMDIR should be set as follows:
  527.  
  528.  
  529.     setenv TERMDIR $HOME     (csh or tcsh)
  530.     export TERMDIR=$HOME     (bash)
  531.  
  532.  
  533.  
  534.   Starting with version 1.16 TERM also knows the variables TERMSHARE and
  535.   TERMMODE. With these variables TERM can be told to run in private mode
  536.   or in shared mode. I will explain how to set the variables for private
  537.   mode and shared mode.
  538.  
  539.   TERMMODE knows the following three values;
  540.  
  541.   o  0 = private
  542.  
  543.   o  1 = system shared
  544.  
  545.   o  2 = user shared
  546.  
  547.  
  548.   1. Running TERM in private mode can be done setting the variables
  549.      TERMDIR and TERMMODE in the following way:
  550.  
  551.      For csh or tcsh
  552.  
  553.        setenv TERMDIR $HOME
  554.        setenv TERMMODE 0
  555.  
  556.  
  557.  
  558.   For bash
  559.  
  560.     export TERMDIR=$HOME
  561.     export TERMMODE=0
  562.  
  563.  
  564.  
  565.   2. When you want to use TERM in shared mode there are two ways of
  566.      setting the variables:
  567.  
  568.  
  569.      a. When TERM is installed as a SUID program only TERMMODE has to be
  570.         set.
  571.  
  572.  
  573.           setenv TERMMODE 2    (csh or tcsh)
  574.           export TERMMODE=2    (bash)
  575.  
  576.  
  577.  
  578.      b. When TERM is installed as a SGID program the variables have to
  579.         be set in the following way:
  580.  
  581.         For csh or tcsh
  582.  
  583.           setenv TERMMODE 1
  584.           setenv TERMDIR /usr/local/lib/term
  585.           setenv TERMSHARE $TERMDIR
  586.  
  587.  
  588.  
  589.      For bash
  590.  
  591.        export TERMMODE=1
  592.        export TERMDIR=/usr/local/lib/term
  593.        export TERMSHARE=$TERMDIR
  594.  
  595.      Setting the variables in this way makes it possible to start old
  596.      clients (clients linked to an older version of client.a) in shared
  597.      mode.
  598.  
  599.   Starting with version 2.0.0 TERM also knows the variable TERMSERVER.
  600.   You need to set this variable when you have multiple modems and you
  601.   have more than one connection at a time. To specify which connection
  602.   to use, you must start TERM with a server name:
  603.  
  604.  
  605.     nohup term -v /dev/modem1 Connection1 &
  606.     nohup term -v /dev/modem2 Connection2 &
  607.  
  608.  
  609.  
  610.   Users should then set the variable TERMSERVER to the connection name
  611.   they want to use:
  612.  
  613.  
  614.     setenv TERMSERVER Connection1   (csh or tcsh)
  615.     export TERMSERVER=Connection2   (bash)
  616.  
  617.  
  618.  
  619.  
  620.   4.6.  Test TERM
  621.  
  622.  
  623.  
  624.   Do a make test (or make termtest for newer versions of TERM) to build
  625.   TERM's test daemon. (term)test works by running two copies of TERM on
  626.   your system, a should now be able to do a trsh and a tupload (try
  627.  
  628.  
  629.     tupload ./term /usr/tmp
  630.  
  631.  
  632.  
  633.   - you should get a copy of the TERM binary in '/usr/tmp'). The local
  634.   TERM's output should show up in 'local.log', the remote's one in
  635.   'remote.log'. You can start TERM up with a -d255 flag to enable
  636.   debugging output to be written to these files, or enable debugging in
  637.   your 'termrc' file.
  638.  
  639.   NOTE: Run test as ./test  so as to avoid your system's test.
  640.  
  641.  
  642.   4.7.  TERM and communication programs
  643.  
  644.  
  645.   Before you can use TERM you must have established a connection via the
  646.   modem using a communication program like kermit or seyon. In the
  647.   documentation of your communication program you can find what you need
  648.   to do to establish the conection with the remote machine.
  649.  
  650.   when you have established the connection with the remote machine and
  651.   you want to run TERM you need to suspend or quit your communication
  652.   program without closing the connection with the remote machine. This
  653.   needs to be done as otherwise the communication program will steal
  654.   characters from linecheck or TERM.
  655.  
  656.   Below for some communication programs I will explain how you can make
  657.   sure that the connection will stay alive and the communication
  658.   programs will not steal characters from linechech or TERM.
  659.  
  660.  
  661.   4.7.1.  Kermit
  662.  
  663.  
  664.   Starting TERM when you use kermit is easy. At the local kermit prompt
  665.   you type suspend. Now you see back your Linux prompt. From this prompt
  666.   you can establish your TERM conection.
  667.  
  668.  
  669.   4.7.2.  Seyon
  670.  
  671.  
  672.   An easy way to start linecheck or TERM when you are using seyon is to
  673.   put linecheck and TERM in the Transfer Menu (controlled by the file
  674.   '$HOME/.seyon/protocols').
  675.  
  676.   In the file '$HOME/.seyon/protocols' add:
  677.  
  678.  
  679.     "Line check" "$cd /tmp; linecheck"
  680.     "Term" "$term -c off -w 10 -t 150 -s 38400 -l $HOME/tlog"
  681.  
  682.  
  683.  
  684.   Then, when you want to execute linecheck or TERM on the local machine,
  685.   you can select the Transfer Menu, either the "Line check" or the
  686.   "Term" item, and Go.
  687.  
  688.   Of course, you can also use the shell command button, and type
  689.   'linecheck' or 'term' in the pop-up dialog box. This also does
  690.   automatic redirection of input and output.
  691.  
  692.  
  693.   4.8.  Make a Transparent Link
  694.  
  695.  
  696.   Presumably, you can establish a modem connection between your local
  697.   and remote hosts. Typically, you are dialling into some kind of
  698.   terminal server and connecting to your remote host from there. You are
  699.   also using some kind of terminal software, such as kermit or seyon to
  700.   talk to your modem (the examples in this document will use kermit,
  701.   since that is what its author uses). If you are having trouble with
  702.   your modem, or your terminal software, take a look at the Serial-
  703.   HOWTO; that should help you out.
  704.  
  705.   Having established your link, you want to make it as transparent as
  706.   possible.  Check the commands on the terminal server (help or ? will
  707.   usually get you started). Go for the 8 bit options whenever possible.
  708.   This may mean changing the way you log in to a system, e.g. if the
  709.   server uses rlogin, you may have to use it and give it the -8 flag to
  710.   make it transparent.  Especially watch out for xon/xoff flow control.
  711.   You do not want that. Try to enable rts/cts (hardware) flow control.
  712.   You may need to check your modem documentation to learn how to
  713.   configure it to do 8-bit rts/cts communications.
  714.  
  715.  
  716.   4.9.  Run linecheck
  717.  
  718.  
  719.   WARNING: In some of the documents the command line options for
  720.   linecheck are mentioned in an incorrect order. I have checked this and
  721.   found the order of options mentioned below to be the correct ones.
  722.  
  723.   NOTE: Starting with TERM version 2.3.0 linecheck no longer needs to
  724.   have the name of a log-file on its command line. It will write its
  725.   output to the file 'linecheck.log' in the directory you start
  726.   linecheck in.
  727.   Linecheck is a program that is supplied with TERM.  It checks the
  728.   transparency of a link, providing configuration information that TERM
  729.   needs to run correctly.  linecheck will send each of the 256 possible
  730.   eight bit characters over the link and verify that each was
  731.   transmitted successfully. TERM needs to be configured to deal with
  732.   characters that cannot be transmitted over the link, and linecheck
  733.   determines what characters these are. You use linecheck after you have
  734.   established as transparent a modem link as possible. To run linecheck,
  735.   do the following
  736.  
  737.  
  738.   1. On the remote system run
  739.  
  740.        linecheck linecheck.log
  741.  
  742.  
  743.  
  744.   2. Escape back to your local system and suspend your communication
  745.      program (see above)
  746.  
  747.   3. On the local system run
  748.  
  749.        linecheck linecheck.log > /dev/modem < /dev/modem
  750.  
  751.  
  752.  
  753.   When linecheck is done, you will find a set of numbers at the bottom
  754.   of the 'linecheck.log' files. These should be escaped in the termrc at
  755.   the other end of the link. For example, in my system my local
  756.   'linecheck.log' said nothing and my remote 'linecheck.log' said to
  757.   escape 29 and 157.  Therefore, my local I have to also ignore it at
  758.   the other; so, in this example, I shall have to ignore 29 and 157 in
  759.   my remote system.
  760.  
  761.   If linecheck hangs, try using
  762.  
  763.  
  764.     linecheck linecheck.log 17 19
  765.  
  766.  
  767.  
  768.   on the remote system and
  769.  
  770.  
  771.     linecheck linecheck.log 17 19 > /dev/modem < /dev/modem
  772.  
  773.  
  774.  
  775.   on the local system. This will escape your xon/xoff (flow control)
  776.   characters, which will hang your line if you have got software flow
  777.   control. If this solves the hanging problems, you will want to escape
  778.   /ignore 17/19 in both 'termrc's'. If your terminal server has other
  779.   characters that will shut it down, try running linecheck with those
  780.   characters escaped, as above. You can spot these characters if
  781.   linecheck hangs. If this is the case, kill it, then look in the log-
  782.   files. The last characters transmitted are likely to be the culprits.
  783.   Try it again with these characters escaped.
  784.  
  785.   In summary, my local termrc has the lines
  786.  
  787.     escape 29
  788.     escape 157
  789.  
  790.  
  791.  
  792.  
  793.   and my remote termrc has the lines
  794.  
  795.  
  796.  
  797.     ignore 29
  798.     ignore 157
  799.  
  800.  
  801.  
  802.   since my remote 'linecheck.log' said to escape 29 and 157.
  803.  
  804.  
  805.   4.10.  Try Running TERM
  806.  
  807.  
  808.   Log into the remote system, making the link as transparent as possible
  809.   (if you have not already done so).  Fire up TERM at the remote end.  I
  810.   use the following:
  811.  
  812.  
  813.     exec term -r -l $HOME/tlog -s 38400 -c off -w 10 -t 150.
  814.  
  815.  
  816.  
  817.   Let us run down each option one by one (note that I could just as
  818.   easily have put these options in my termrc. I did it this way because
  819.   it saves editing a file while getting TERM set up).
  820.  
  821.   exec means to destroy your current shell, running the given program in
  822.   its place. I exec things because I do not intend to use my login shell
  823.   again; so it is just wasting memory. If you are debugging the link and
  824.   can reliably kill the remote TERM, you might not want to do an exec.
  825.  
  826.   The -r option is needed at exactly one end. TERM will then see this
  827.   end as the remote end of the connection (Note that TERM's remote end
  828.   can thus be your local machine). If you do not use this option at one
  829.   end TERM clients will spontaneously crash.
  830.  
  831.   -l $HOME/tlog. This logs errors to the file tlog in my home directory.
  832.   Very useful for debugging. No reason not to do this.
  833.  
  834.   -s 38400 : I have got a 14400 baud modem, with compression.  For
  835.   optimal compression ratios, I want to be able to push bits down the
  836.   pipe as fast as possible. For a slower modem, you should use something
  837.   lower. Note that if you have a slower machine with 16450 uart on your
  838.   serial port, high baud rates can cause data loss by overloading the
  839.   chip on your serial port. TERM will recover from this, but if you see
  840.   a lot of error messages in your log file, (or get overrun warnings
  841.   from linux kernel versions 0.99pl15 and up) you again might want to
  842.   lower this number.
  843.  
  844.   -c off : This turns data compression off. I have got a compressing
  845.   modem, and I do not want to compress things twice.
  846.  
  847.   -w 10 -t 150 : Again, these are options to optimize my fast modem
  848.   link. I have set my window to 10 and my timeout to 150. This is
  849.   according to the recommendation in the term_setup man page.
  850.  
  851.   Escape back to your local machine and suspend your communication
  852.   program (see above). You do not want it running while TERM is running,
  853.   because it will fight with TERM over the serial port. If you can
  854.   convince your modem to not hang up when you exit your communication
  855.   program (when it toggles DTR), you could just exit the program at this
  856.   point.
  857.  
  858.  
  859.   Now run TERM locally. I use:
  860.  
  861.  
  862.     term -c off -l $HOME/tlog -s 38400 -w 10 -t 150 < /dev/modem > /dev/modem &
  863.  
  864.  
  865.  
  866.   I need to tell TERM where the modem is; so I point both standard input
  867.   and output at '/dev/modem' (that is what the < and > do). I also run
  868.   it in the background; so I can use this screen for something else if I
  869.   want to.
  870.  
  871.   TERM should work now :-). Try a trsh, and see what happens. If you
  872.   hang, or your link seems slow, take a look at your 'tlog' at each end.
  873.   Are you getting timeouts or error messages? If so, then you have
  874.   configured something incorrectly. Try again (after you have finished
  875.   reading this :-). Note that the connection will not seem blazingly
  876.   fast, especially if you are using compression - it will be a little
  877.   jumpy. The real speed comes in during file transfer and the like.
  878.  
  879.  
  880.   4.11.  Terminate your TERM connection
  881.  
  882.  
  883.   Most certainly, after you have done a lot of work using TERM, you want
  884.   to finish your work and bring your TERM connection down. For this to
  885.   be realized there are four ways:
  886.  
  887.  
  888.   1. Kill the TERM programs at both sides of the connection. This is the
  889.      least recommended way of terminating your connection.
  890.  
  891.   2. A better way is to execute the following command locally:
  892.  
  893.  
  894.        echo '00000' > /dev/modem
  895.  
  896.  
  897.  
  898.   This will nicely terminate your TERM connection. It will work for all
  899.   version of TERM. Make sure that the sequence of zeros contains at
  900.   least five zeros.
  901.  
  902.   3. In the termrc of TERM versions 2.0.0 and higher you can now enter a
  903.      statement called terminate '<some string>'. This sets a string that
  904.      will cause TERM to exit ('00000' by default). It must be at least
  905.      five characters long, to avoid accidently terminations.
  906.  
  907.   4. Starting with version 1.14 there is the program tshutdown (actually
  908.      for version 1.14 it is available as a patch, for newer versions it
  909.      is in the package). Executing tshutdown nicely terminates your TERM
  910.      connection.
  911.  
  912.  
  913.   4.12.  Removing TERM from your partition
  914.  
  915.  
  916.   Ok, you asked for this. As some of you want to get rid of TERM I here
  917.   present you the steps to be done in removing TERM. In the process of
  918.   removing TERM you have to fulfil the following steps:
  919.  
  920.  
  921.   o  Removing directories with their contents. Depending on how you
  922.      installed TERM, one or more of the following directorieswill exist
  923.      on your machine:
  924.  
  925.        $HOME/.term/termrc
  926.        $HOME/.term/termrc.<server>
  927.        $HOME/term/termrc
  928.        $HOME/term/termrc.<server>
  929.        /usr/local/lib/term/termrc
  930.        /usr/local/lib/term/termrc.<server>
  931.        /etc/termrc
  932.        /etc/termrc.<server>
  933.  
  934.  
  935.  
  936.   These directories can be removed together with their contents. Use
  937.   '/bin/rm -rf' to get this done.
  938.  
  939.   o  The group 'term'. For some of the ways of installation you had to
  940.      create a group 'term'. Check the file '/etc/group' for the 'term'
  941.      entry. When it exists you can remove the entry.
  942.  
  943.   o  The TERM-package and TERM-aware executables. This is probably the
  944.      hardest part in removing TERM. For the executables coming with the
  945.      TERM-package you have to look in the directory '/usr/local/bin' or
  946.      the directory '$HOME/bin'.
  947.  
  948.      With executables you made TERM-aware yourself I cannot help you.
  949.      You need to know what executables you made TERM-aware in order to
  950.      know what executables you have to remove. Do not forget
  951.      configuration, default and other files coming with some of these
  952.      executables.
  953.  
  954.   o  Library files. To remove these you best can execute the following
  955.      commands:
  956.  
  957.  
  958.        cd /
  959.        find . -name libtermnet* -exec /bin/rm {}
  960.  
  961.  
  962.  
  963.   This will find and remove the library files.
  964.  
  965.   o  Include file. Also for this one the easiest way is to execute the
  966.      following two commands:
  967.  
  968.  
  969.        cd /
  970.        find . -name termnet.h -exec /bin/rm {}
  971.  
  972.  
  973.  
  974.   This will remove the include file.
  975.  
  976.   o  Manual pages. When you have installed the TERM manual pages you can
  977.      now find them back in one of the following directories:
  978.  
  979.  
  980.        /usr/local/man/man1
  981.        /usr/local/man/cat1
  982.        $HOME/man/man1
  983.        $HOME/man/cat1
  984.  
  985.  
  986.  
  987.   At least you have to check for the following manual pages: term,
  988.   term_clients, term_setup, tdownload, linecheck, trdate, trdated,
  989.   termrc, termtest, tmon, tredir, trsh, tshutdown, tudpredir, tupload,
  990.   txconnand finally tiptest.
  991.   o  Temporary user directory. This is de directory '/usr/tmp/private'
  992.      and its contents.
  993.  
  994.   After this exercise you can be quite sure that you have removed
  995.   everything related to TERM.
  996.  
  997.  
  998.   4.13.  Optimizing your connection
  999.  
  1000.  
  1001.   Once you have got TERM running, you might want to try to get things
  1002.   optimized. A good way to measure the speed of your link is to run tmon
  1003.   in one window while up/downloading a file in another. Try both (big)
  1004.   text files and compressed files; the plain text should go a factor of
  1005.   two-ish faster than the compressed files.  The parameters you want to
  1006.   fiddle with are baud rate (-s), compression (-c), windows (-w),
  1007.   timeout (-t) and retrain (-A).
  1008.  
  1009.   Watch out with the retrain parameter. With TERM version 1.19 I got a
  1010.   performance decrease of 80% to 90% compared to running TERM without
  1011.   the retrain parameter. It is not clear if this is a bug in TERM
  1012.   version 1.19 and if this problem exists only with TERM version 1.19.
  1013.  
  1014.   Baudrate: the maximum number of bits per second TERM will try to send
  1015.   over the serial link. TERM will avoid sending characters at a higher
  1016.   data rate than this. The default is to use the speed of your
  1017.   computer's serial port, but be warned that this may be too high if
  1018.   your modem runs at a lower rate over the phone line. The baud rate
  1019.   option is intended for systems that buffer output to the modem. During
  1020.   setup and tuning it is better to use a small baud rate rather than one
  1021.   which is too large. For high speed links (> 38400), making it
  1022.   unlimited is probably advantageous. This is achieved by using the
  1023.   value 'off'. TERM will then rely solely on your kernel to do flow
  1024.   control.
  1025.  
  1026.   Compression: you want this on if you do not have a compressing modem.
  1027.   If you do have such a modem, turn compression off, otherwise you will
  1028.   be compressing things twice, which typically increases the amount of
  1029.   data transmitted. Compressing modems are those that use the MNP-5 or
  1030.   V42.bis protocols. Check your modem documentation and the message when
  1031.   your modem connects.
  1032.  
  1033.   Windows: this is the number of chunks of data, or packets, that TERM
  1034.   will let go over the line before it gets an acknowledgment (or ack)
  1035.   from the remote TERM. For fast modems, increasing this can be a win;
  1036.   for slower links this can overwhelm the remote end.
  1037.  
  1038.   Timeout: the time TERM will wait for an ack. If you have increased
  1039.   windows, and you are getting timeouts in your log-file, try increasing
  1040.   this.
  1041.  
  1042.   For 14400/V42.bis, I use -c off -w 10 -t 150. I get around 1700 cps on
  1043.   compressed files and 3500 cps on ASCII files using tupload.
  1044.  
  1045.  
  1046.   4.14.  Troubleshooting
  1047.  
  1048.  
  1049.   In this section some thoughts are given about what to check when you
  1050.   have problems executing TERM or one of its clients.
  1051.  
  1052.  
  1053.   o  Did you clean up the TERM directory structure? With newer versions
  1054.      of TERM the structure of the directory tree under
  1055.      '/usr/local/lib/term' has changed a couple of times. If you are not
  1056.      aware of this, it can cause all kinds of error messages. The best
  1057.      thing to do is to delete the directory tree under
  1058.      '/usr/local/lib/term' (save your 'termrc') and then install your
  1059.      new TERM version. This way, you avoid the struggle with a messed up
  1060.      directory tree.
  1061.  
  1062.   o  Did you remove old sockets? When you update your TERM version
  1063.      remove all the sockets (called 'socket=') created by TERM. No doing
  1064.      this can cause strange problems. To find out what socket TERM is
  1065.      listening to you can use the "netstat" program.
  1066.  
  1067.   o  TERM does not compile correct on sunOS 4.1.3? You have configured
  1068.      TERM with './configure --user'. During compilation you are getting
  1069.      a assembler error on a unknown '-k' flag. The reason of this error
  1070.      is unknown. The solution to this error is to configure TERM with
  1071.      static libraries. So, you have to do './configure --user --static'
  1072.      and then continue with the compilation process the way you normally
  1073.      do. Now TERM should compile correct.
  1074.  
  1075.   o  termtest is presenting you the error: 'Term: failed to connect to
  1076.      term socket '/root/.term/sockettest''? When termtest runs it
  1077.      expects the executable 'term' to be in the same directory as
  1078.      termtest. When you do a 'make install' prior to running termtest,
  1079.      the TERM binary is moved to '/usr/local/bin' (or some other bin
  1080.      directory).
  1081.  
  1082.      The workaround for this is to link the binary to the source
  1083.      directory:
  1084.  
  1085.  
  1086.        ln -s /usr/local/bin/term /usr/src/term-<version_number>/term
  1087.  
  1088.  
  1089.  
  1090.   o  Are you running the right binary? TERM has been updated quite a
  1091.      lot, and many systems have different versions of the programs
  1092.      floating around. Make sure you are using the right version. Note
  1093.      that this applies to linecheck too. You can use bash's type -a or
  1094.      the whereis command to find which program is being run.  TERM
  1095.      versions after 1.11 should print out their version number when they
  1096.      start up.  (Although version 1.14 claims to be 1.12.  Sigh.)
  1097.  
  1098.   o  Do you have the right 'termrc' in the right place? Depending on the
  1099.      version of TERM you are running and the way you installed TERM
  1100.      (being root or user) this file has to be in one of the following
  1101.      directories:
  1102.  
  1103.  
  1104.        $HOME/.term/termrc
  1105.        $HOME/.term/termrc.<server>
  1106.        $HOME/term/termrc
  1107.        $HOME/term/termrc.<server>
  1108.        /usr/local/lib/term/termrc
  1109.        /usr/local/lib/term/termrc.<server>
  1110.        /etc/termrc
  1111.        /etc/termrc.<server>
  1112.  
  1113.  
  1114.  
  1115.   Some systems have pre-installed 'termrc' files; make sure they are
  1116.   gone before you set things up. If you are running things as root,
  1117.   lookout for '/.term'. TERM creates files (sockets actually) while it
  1118.   is running; so it has its own directory, (note, there is no leading
  1119.   dot in 'termrc'!).
  1120.  
  1121.   o  Does TERM find its 'termrc' file? when you start up TERM at both
  1122.      sides, you should see messages like the one below:
  1123.        Term version: 2.2.9
  1124.        Reading file:  /usr/local/lib/term/termrc
  1125.        Using shared mode.
  1126.  
  1127.  
  1128.  
  1129.   When the second line is missing TERM cannot find its 'termrc' file and
  1130.   you know that something is gone wrong during the installation (unless
  1131.   you are not using a 'termrc' file and enter all the options to the
  1132.   command line :-). Check the place and the permissions of the 'termrc'
  1133.   file on the site TERM cannot find its 'termrc' file.
  1134.  
  1135.   o  Do the entries in the 'termrc' file have the correct syntax and
  1136.      spelling? A known problem is that people who need to escape and
  1137.      ignore several characters enter them like this in the 'termrc'
  1138.      file:
  1139.  
  1140.  
  1141.        escape 1,4,30,255
  1142.        ignore 1,4,30,255
  1143.  
  1144.  
  1145.  
  1146.   Although TERM does NOT like this it will not complain. It only escapes
  1147.   or ignores the first character presented to the escape or ignore
  1148.   statement. The others characters are silently handled as not being
  1149.   there.
  1150.  
  1151.   When you have to escape or ignore several characters you have to put
  1152.   them on separate lines in your 'termrc' file, each line starting with
  1153.   the keyword escape or ignore. Only when you have to escape or ignore a
  1154.   range of characters you can do it the following way:
  1155.  
  1156.  
  1157.     escape 16-19      # escape characters 16, 17, 18, 19
  1158.     escape 23         # 23
  1159.     escpae 255        # and 255
  1160.     ignore 16-19      # ignore characters 16, 17, 18, 19
  1161.     ignore 23         # 23
  1162.     ignore 255        # and 255
  1163.  
  1164.  
  1165.  
  1166.   o  Is you 'term' or '.term' directory mounted with NFS? If your 'term'
  1167.      or '.term' directory is mounted with NFS you need to set the flag
  1168.      -DTERM_NFS_DIR in the CFLAGS line of the Makefile. Alas, for the
  1169.      author this flag causes a compile error when TERM 1.19 is compiled
  1170.      on a machine running sunOS 4.*.
  1171.  
  1172.   o  Are all files and directories owned by the correct user and group
  1173.      and do they have the correct permissions? This should be no
  1174.      problems as these permissions are set during the installation
  1175.      phase. However, when you port your own programs to TERM you must be
  1176.      aware of this. Also when you change the mode TERM is working in
  1177.      (i.e. from private mode to shared mode) file and directory
  1178.      ownerships and permissions have to be adapted.
  1179.  
  1180.   o  You are getting the error gethostbyname: <hostname>: Non-
  1181.      authoritative `host not found', or, server failed
  1182.  
  1183.      To solve this you have to check the following things:
  1184.  
  1185.  
  1186.      1. Is the file '/etc/hosts' configured correctly? <hostname> is not
  1187.         the name of your host (old SLS releases and some old and new
  1188.         Slackware releases are shipped with hostname 'darkstar' for
  1189.         example). Change this in this file. It must at least contain a
  1190.         line like below (the format is described above it):
  1191.  
  1192.  
  1193.           # Local Hosts Format:
  1194.           #  IP_NUMBER            HOSTNAME        ALIASES
  1195.           #
  1196.           # Here is the name of your host, first, followed by any aliases
  1197.           127.0.0.1       localhost       linuxpc.domain  linuxpc
  1198.  
  1199.  
  1200.  
  1201.      When your only connection to the outside world is by TERM the line
  1202.      above is the only one that may appear in the file '/etc/hosts'. Do
  1203.      not put actual addresses of frequently visited destinations in
  1204.      '/etc/hosts'. TERM does not like these to be in '/etc/hosts' and it
  1205.      will hang on them.
  1206.  
  1207.      2. Are your '/etc/rc*' and '/etc/resolv.conf' files world readable
  1208.         (chmod ugo+r)?
  1209.  
  1210.      3. Last, make sure that you have installed the TCP/IP loopback-
  1211.         interface on your machine. You can check for loopback by running
  1212.         the command 'ifconfig'. When you have installed the loopback-
  1213.         interface you will at least get something like:
  1214.  
  1215.  
  1216.           lo        Link encap:Local Loopback
  1217.                     inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.255.255.0
  1218.                     UP BROADCAST LOOPBACK RUNNING  MTU:2000  Metric:1
  1219.                     RX packets:0 errors:0 dropped:0 overruns:0
  1220.                     TX packets:4984 errors:0 dropped:0 overruns:0
  1221.  
  1222.  
  1223.  
  1224.      on your screen. During boot time you can furthemore check which
  1225.      protocols are in use. On my machine a line like the one below then
  1226.      appears:
  1227.  
  1228.  
  1229.        IP Protocols: ICMP, UDP, TCP
  1230.  
  1231.  
  1232.  
  1233.      For the installation of TCP/IP and the loopback-interface, please
  1234.      read to the NET-HOWTO.
  1235.  
  1236.   o  You are getting all kinds of 'timed out' messages in your TERM log
  1237.      files?  This means that your TERM connection is not optimized. A
  1238.      small number of these messages every now and then is not a problem.
  1239.      These are most certainly due to temporal factors influencing the
  1240.      physical connection between your local and remote hosts.
  1241.  
  1242.      When you get a lot of these messages all the time your connection
  1243.      will slow down considerably. You have to fiddle with the parameters
  1244.      mentioned in the section 'Optimizing your connection' above. Alas,
  1245.      this part of the installation is a process of trial and error. No
  1246.      hard rules can be given about the numbers to be presented to the
  1247.      various parameters as many factors have an influence on the
  1248.      connection. These factors differ between the connections and even
  1249.      in time.
  1250.  
  1251.   o  Normal FTP with redirected ports does not work for you? Alas, it is
  1252.      a known problem that redirection of the ports needed by FTP (20 and
  1253.      21) does not give you a working FTP. The only solution is to get a
  1254.      TERM-aware ftp or ncftp version. Alas, also some TERM-aware ftp
  1255.      versions seem not to work.
  1256.  
  1257.  
  1258.   5.  TERM clients
  1259.  
  1260.  
  1261.   TERM provides several default clients. They include trsh, tmon,
  1262.   tupload, tredir, txconn and in newer versions trdate, trdated.
  1263.   Furthermore, starting with version 2.0.0 tudpredir is available and
  1264.   from version 2.1.0 tdownload is available. This section will deal with
  1265.   trsh, tmon, tupload, tdownload, trdate and trdated.  The others each
  1266.   have their own section.  No TERM client will work until you have
  1267.   established a TERM link.
  1268.  
  1269.   tmon is a simple utility to monitor the statistics of your link.  It
  1270.   prints a time histogram of characters transmitted and received. It is
  1271.   invoked simply as tmon. Since around version 1.11, tmon has had a bug
  1272.   that causes some information to be garbled (??).
  1273.  
  1274.   trsh is similar to rsh. Without arguments, it spawns an interactive
  1275.   shell on the remote system (i.e. it logs you in). trsh is one of the
  1276.   primary means of accessing the remote end of the link via TERM. If
  1277.   given an argument, trsh executes that argument as a command on the
  1278.   remote system. For example
  1279.  
  1280.  
  1281.     trsh ls
  1282.  
  1283.  
  1284.   would give you a listing of the files in your home directory on the
  1285.   remote system.
  1286.  
  1287.   tupload will transfer a file, given as its first argument, from local
  1288.   to remote. By default, the files will be put in the same directory
  1289.   that you invoked TERM from at the other side. To put files in another
  1290.   directory, give their names as a second argument to tupload. For
  1291.   example, if I want to put a copy of the file 'term114.tar.gz' in
  1292.   '/usr/tmp' on the remote system, I would type
  1293.  
  1294.  
  1295.     tupload term114.tar.gz /usr/tmp
  1296.  
  1297.  
  1298.   When you use tupload you can use wild cards like in 'tupload a.*'. The
  1299.   shell expands the wild card and tupload is called as 'tupload a.1 a.2
  1300.   ......'.
  1301.  
  1302.   tdownload will transfer a file, given as its first argument, from
  1303.   remote to local. By default, the files will be put in the same
  1304.   directory that you invoked TERM from at the local side. To put files
  1305.   in another directory, give their names as a second argument to
  1306.   tdownload. For example, if I want to put a copy of the file
  1307.   'term114.tar.gz' in '/usr/tmp' on the local system, I would type
  1308.  
  1309.  
  1310.     tdownload term114.tar.gz /usr/tmp
  1311.  
  1312.  
  1313.   When you use tdownload you cannot use wild cards like in 'tdownload
  1314.   a.*'. Reason for this is that the remote directory is not available to
  1315.   your local shell when you use tdownload; so your local shell cannot
  1316.   expand the wild cards.
  1317.  
  1318.   trdate is a time setting utility. It reads the time on the remote
  1319.   machine and sets the local clock to the remote time. It must be run as
  1320.   root.
  1321.   trdated is the daemon version of trdate. When it is started in
  1322.   'rc.local' it is run as daemon in which case it updates the time every
  1323.   5 minutes (default). Even when there is no TERM connection, this
  1324.   daemon will start up when set in the rc.local. Once a TERM connection
  1325.   is created it starts updating the time.
  1326.  
  1327.  
  1328.   6.  X and TERM
  1329.  
  1330.  
  1331.   TERM allows users to open up X windows on the local machine from
  1332.   clients that are running on a machine on the network. This is done by
  1333.   using the txconn client. txconn is executed on the remote, network-
  1334.   connected machine; it is invoked simply as txconn. It goes into the
  1335.   background and returns a number on the standard output; this number is
  1336.   the display number that clients should use to access the X server on
  1337.   the local machine. An example should make this clear.  I am logged in,
  1338.   via trsh, to my remote TERM host, named foo. On foo, I do the
  1339.   following
  1340.  
  1341.  
  1342.     foo$ txconn
  1343.     Xconn bound to screen 10
  1344.     :10
  1345.     foo$
  1346.  
  1347.  
  1348.  
  1349.   Now, on any host that I wish to run an X client on, that is to display
  1350.   on my local machine's X server, I do
  1351.  
  1352.  
  1353.     setenv DISPLAY foo:10
  1354.  
  1355.  
  1356.  
  1357.   (for bash you should use export DISPLAY=foo:10). In some cases it can
  1358.   furthermore be necessary to do a
  1359.  
  1360.  
  1361.     xhost + foo
  1362.  
  1363.  
  1364.   or even a
  1365.  
  1366.  
  1367.     xhost +
  1368.  
  1369.  
  1370.  
  1371.   on your local machine. Now when I start the client, it will try to
  1372.   connect to screen 10 on machine foo, but txconn is listening to this
  1373.   screen, and will forward all X protocol packets via TERM to the X
  1374.   server on the local host - i.e. the window will open up on your local
  1375.   machine.
  1376.  
  1377.   It is possible to go the other way - run a client on your local
  1378.   machine and have it open up a window on a remote machine on the
  1379.   network; however we will defer explaining this until after we have
  1380.   discussed tredir.
  1381.  
  1382.   The X protocol is not very efficient; it wastes some bandwidth. This
  1383.   is usually not a problem over an ethernet, but can be murder over a
  1384.   modem. X11R6 is supposed to introduce a low bandwidth version of the X
  1385.   protocol, LBX. If however you are using X11R5 you can use a utility
  1386.   named sxpc which compresses the X protocol, improving response over
  1387.   serial lines. Sxpc includes a write-up on how to get it working with
  1388.   TERM, and is recommended. The sxpc package also explains how to use
  1389.   xauth; so it is doubly recommended.
  1390.  
  1391.  
  1392.   7.  tredir
  1393.  
  1394.  
  1395.   tredir is one of TERM's most powerful utilities, allowing most
  1396.   important network services to be performed over a TERM link. Before we
  1397.   explain how to use tredir, it is necessary to give some background on
  1398.   network services. We have talked about network services before, but we
  1399.   have not said exactly what they are. Services are just that - services
  1400.   that are provided by the network. Examples of services include telnet,
  1401.   which provides logins between machines, the File Transfer Protocol,
  1402.   ftp, which transfers files between machines, and smtp, the Simple Mail
  1403.   Transfer Protocol, which is used whenever you send electronic mail.
  1404.   Each network service has a port number associated with it.  The
  1405.   mapping of port numbers to services is given in the file internet-
  1406.   connected machines.
  1407.  
  1408.   How are these services invoked? Each networked machine runs a daemon
  1409.   called inetd, which listens for attempts to connect to the network
  1410.   ports. These requests can come from either the network or the local
  1411.   machine. A network service is obtained by connecting to a particular
  1412.   inetd port.  When a network request is made, inetd knows exactly which
  1413.   service is involved by the port number the request is made on. If
  1414.   inetd is configured to do so, it provides the relevant service to the
  1415.   requesting connection. inetd's configuration is given by the file
  1416.   '/etc/inetd.conf', which has a list of the services that inetd
  1417.   provides. For more information, see the man pages for inetd and
  1418.   inetd.conf.
  1419.  
  1420.   You can communicate directly with network services by using telnet
  1421.   (n.b. not termtelnet). For example, to talk to the sendmail, (or smtp)
  1422.   daemon on machine machine_name, you can do a telnet machine_name smtp,
  1423.   or telnet machine_name 25, (since 25 is the number assigned to smtp in
  1424.   '/etc/services'). You should get a polite greeting from the daemon on
  1425.   the remote machine. This is a very useful trick for debugging network
  1426.   problems and checking ports redirected with tredir (see below).
  1427.  
  1428.   Tredir works very much like inetd. It runs in the background as a
  1429.   daemon, listening to the network ports, waiting for a request. When a
  1430.   request for a service is made, instead of providing that service, as
  1431.   inetd does, tredir forwards the request over the TERM link to the
  1432.   remote TERM, which makes the request over the network, returning the
  1433.   result back over the link to the local client. Tredir can forward the
  1434.   request to any machine on the network, but by default sends it to the
  1435.   machine at the other end of the TERM link. Tredir redirects TCP
  1436.   (Transmission Control Protocol) network services over the TERM link.
  1437.  
  1438.   The common command format of tredir is:
  1439.  
  1440.  
  1441.     tredir [this_computer:]port [that_computer:]port
  1442.  
  1443.  
  1444.  
  1445.   An example should make this clear. Let us redirect a local port to the
  1446.   telnet port on the remote machine. To do this we would do
  1447.  
  1448.  
  1449.     tredir 2023 23
  1450.  
  1451.  
  1452.  
  1453.   Now, anyone who connects to port 2023 on the local machine will be
  1454.   redirected to port 23 (telnet) on the remote machine.  Here is an
  1455.   example session; the local machine is mymachine.modem.home and the
  1456.   remote machine is netsun.
  1457.  
  1458.  
  1459.  
  1460.     $ tredir 2023 23
  1461.     Redirecting 2023 to 23
  1462.     $ telnet localhost 2023
  1463.     Trying 127.0.0.1...
  1464.     Connected to mymachine.modem.home
  1465.     Escape character is '^]'.
  1466.  
  1467.  
  1468.     SunOS UNIX (netsun)
  1469.     login:
  1470.  
  1471.  
  1472.  
  1473.   This example is actually quite useful. If I were instead to do the
  1474.   tredir on netsun. I could then telnet in to mymachine from the network
  1475.   simply by connecting to the redirected port on the networked machine
  1476.   (using telnet) - i.e. telnet netsun 2023.
  1477.  
  1478.   The general principle in using tredir is to redirect the desired
  1479.   service to a machine on the network. Our next example will allow us to
  1480.   read news on the local machine over our TERM link from a news server
  1481.   on the network. News is provided by the nntp service, port number 119.
  1482.   All decent news readers allow you to specify what port number they
  1483.   will use, either via a configuration file or an environment variable.
  1484.   Let us specify this local port to be 2119. Now, let us say that our
  1485.   news server is news.domain.org. We will redirect port 2119 to port 119
  1486.   on news.domain.org; we will then tell our news reading software that
  1487.   the nntp server is located at port 2119 on the local host. Since this
  1488.   will depend on the news reader that you use, I will just test the link
  1489.   with telnet instead of firing up a news reader:
  1490.  
  1491.  
  1492.     $ tredir 2119 news.domain.org:119
  1493.     Redirecting 2119 to news.domain.org:119
  1494.     $ telnet localhost 2119
  1495.     Trying 127.0.0.1...
  1496.     Connected to mymachine.modem.home.
  1497.     Escape character is '^]'.
  1498.     200 news.domain.org InterNetNews NNRP server INN 1.4 07-Dec-41 ready
  1499.     (posting ok).
  1500.  
  1501.  
  1502.  
  1503.   If you can get this far, all you have to do is configure your news
  1504.   reader to be able to read news via TERM. (n.b., if you read news like
  1505.   this, be sure that in all your posts you set a Reply-To: header to an
  1506.   network email address that you can be reached at, otherwise people who
  1507.   want to get in touch with you will be sending mail to whatever (wrong)
  1508.   data your news reader puts in the From: header).
  1509.  
  1510.  
  1511.   7.1.  tredir can bite!
  1512.  
  1513.  
  1514.   The astute reader, after reading the last example will be wondering
  1515.   why port 2119 was redirected to port 119 - since news readers default
  1516.   to port 119, why could I not do a tredir 119 news.domain.org:119 and
  1517.   skip the news reader configuration? The answer is that all ports
  1518.   numbered less than 1024 are ``reserved ports'', and only the superuser
  1519.   can listen to them. If one is willing to take a security risk and make
  1520.   tredir an SUID program, or run tredir as root, then one can redirect
  1521.   reserved ports and avoid the hassle of renaming services.
  1522.  
  1523.   Another problem with using reserved ports is that inetd is often
  1524.   already listening to these ports, and only one program at a time can
  1525.   listen to a port. In order to use such a port, you must change port
  1526.   you want to redirect. This is most easily done by commenting out the
  1527.   line with the offending service by putting a # character at the
  1528.   beginning of the line. The superuser must then send inetd a HUP signal
  1529.   (kill -1 inetd-pid) to get it to reread its configuration.
  1530.  
  1531.  
  1532.   7.2.  Stupid tredir tricks
  1533.  
  1534.  
  1535.   In this section we will describe some of the more common uses for
  1536.   tredir. We have already described how to redirect nntp and telnet
  1537.   services; here we will give some more complicated examples.
  1538.  
  1539.  
  1540.   7.2.1.  X windows
  1541.  
  1542.  
  1543.   In a previous section, we described how to get an X client running on
  1544.   the network to open a window on your home machine using txconn. The
  1545.   same technique could be used on your home machine to display a client
  1546.   on the machine at the remote end of your TERM link.  But how does one
  1547.   display an X client on a network machine that is not the remote end?
  1548.   The answer lies in knowing that X uses a particular network service
  1549.   just like the other programs we have been discussing. An X server
  1550.   listens for a network request on a port whose number is given by the
  1551.   formula  port = 6000 + display number, e.g. an X server managing
  1552.   screen 0 on a machine would listen to port 6000, if it were managing
  1553.   screen 2, it would listen to port 6002.  When you set your DISPLAY
  1554.   environment variable to xmachine:n, your X clients will try to connect
  1555.   to port 6000 +n on xmachine.
  1556.  
  1557.   We can use this to trick X clients on your local machine to open up
  1558.   windows on remote displays. Let us say I want to open up an xterm,
  1559.   running on my local machine, on display 0 of machine xmachine, which
  1560.   is running some place on the network. I first pick a local display
  1561.   number, say 2 (do not use 0, since that is what your local X server
  1562.   will be using). I will map this display to display 0 on xmachine. In
  1563.   terms of ports, this means I want to redirect the local port 6002 to
  1564.   the remote port 6000.  I do the following
  1565.  
  1566.  
  1567.     $ tredir 6002 xmachine:6000
  1568.     $ setenv DISPLAY localhost:2
  1569.     $ xterm
  1570.  
  1571.  
  1572.  
  1573.  
  1574.   This should open up an xterm on machine xmachine.  Note that I set the
  1575.   DISPLAY to localhost:2. This is because X clients will sometimes use
  1576.   unix domain sockets instead of internet domain sockets, at their own
  1577.   option, when connecting to a local display, if DISPLAY is set to :2.
  1578.   localhost:2 says to use a TCP connection.
  1579.  
  1580.   Note that as far as xmachine is concerned, the X request is coming
  1581.   from the machine on the remote end of your TERM link (remotemachine) -
  1582.   so if you need to authorize the connection, you should either do an
  1583.   xhost + remotemachine on xmachine or use xauth to update the
  1584.   '.Xauthority' file on your local machine for display number 2, using
  1585.   the key from xmachine.
  1586.  
  1587.   Again, to speed up X connections, you can use the program sxpc, which
  1588.   includes an explanation of how to use tredir to establish the link and
  1589.   authorize it using xauth.
  1590.  
  1591.  
  1592.   7.2.2.  Mail with TERM
  1593.  
  1594.  
  1595.   Well, you asked for it. Electronic mail has the justifiable reputation
  1596.   of being one of the most difficult things to get working right on a
  1597.   UNIX system. To really get TERM working correctly with mail means that
  1598.   you have to understand how mail works, which is beyond the scope of
  1599.   this document. To learn more about mail, you should consult a book on
  1600.   UNIX system administration and/or the comp.mail.misc FAQ, available
  1601.   for anonymous ftp on rtfm.mit.edu:pub/usenet/comp.mail.misc. There are
  1602.   also currently two packages available for anonymous ftp on
  1603.   sunsite.unc.edu that will help you get mail running under TERM - they
  1604.   are term.mailerd+smail by Byron A. Jeff and the BCRMailHandlerXXX by
  1605.   Bill C. Riemers.
  1606.  
  1607.   That being said, we will give a thumbnail description of how mail
  1608.   works.  There are two parts to getting mail running, sending messages
  1609.   and receiving messages. We will begin with sending messages from your
  1610.   local box to the network.
  1611.  
  1612.   There are two classes of mail programs. The first is the mail user
  1613.   agent (MUA). MUA's help you read, compose and send messages. Examples
  1614.   of MUA's are elm, pine, Mail and vm.  MUA's do not really do any
  1615.   networking; they just put the messages together - the real work of
  1616.   sending mail is done by the second class of mail programs, the mail
  1617.   transfer agents (MTA's). These are invoked by the MUA's. They take the
  1618.   message, decide where to send it by looking at the address, and then
  1619.   actually deliver it over the network.
  1620.  
  1621.   The two most common MTA's on Linux systems are sendmail and smail. The
  1622.   basic idea is to get your MTA to connect to another MTA running on a
  1623.   machine on the net that will know what to do with your message. This
  1624.   is done by redirecting a local port to the smtp port on the net
  1625.   machine. You then have to tell you MTA to take any message it does not
  1626.   know what to do with, and send it out over the redirected port on your
  1627.   local machine to the MTA on the remote machine, which will then route
  1628.   your message to its correct destination.
  1629.  
  1630.   How do we do this using smail?  We first redirect a port to the smtp
  1631.   port on the network mail machine (mailhost):
  1632.  
  1633.   tredir XXXX mailhost:25
  1634.  
  1635.   here XXXX is the port number that the smail on the localhost will
  1636.   connect to (note that I have to give this port a name in my
  1637.   '/etc/services' to get smail to recognize it). Smail has several
  1638.   configuration files that usually live in '/usr/local/lib/smail'. The
  1639.   ones we care about are that I am assuming you have already got smail
  1640.   configured correctly for local mail - delivery to files and pipes and
  1641.   such things.  Again, consult the documentation if you have not.
  1642.  
  1643.   In the file 'config', we put the following definition:
  1644.  
  1645.  
  1646.     smart_path=localhost
  1647.  
  1648.  
  1649.  
  1650.  
  1651.   localhost is the machine that smail connects to when it does not know
  1652.   what to do with a message.
  1653.  
  1654.   In 'routers' we put
  1655.  
  1656.  
  1657.  
  1658.     smart_host:
  1659.     driver=smarthost,
  1660.     transport=termsmtp;
  1661.     path = localhost
  1662.  
  1663.  
  1664.  
  1665.   In 'transports' we put
  1666.  
  1667.  
  1668.  
  1669.     termsmtp:        driver=tcpsmtp,
  1670.           inet,
  1671.           return_path,
  1672.           remove_header="From",
  1673.           append_header="From: YOUR_NET_ADDRESS",
  1674.           -received,
  1675.           -max_addrs, -max_chars;
  1676.           service=YOUR_SMTP_SERVICE,
  1677.  
  1678.  
  1679.  
  1680.   In the above, the header lines change the From header in all your
  1681.   outgoing mail to the address, YOUR_NET_ADDRESS, which is the network
  1682.   address you want mail sent to. If more than one user is going to be
  1683.   using your TERM link, you will have to do something more fancy, like
  1684.   keep a database of local user's network addresses and insert these in
  1685.   the From: headers.
  1686.  
  1687.   The service line is the name of the local port number that you have
  1688.   redirected to the smtp port on the network connected machine. In my
  1689.   version of smail, I cannot just set this to a number, I have to set it
  1690.   to a name, like ``foo'', and then define ``foo'' in my '/etc/services'
  1691.   to be the number of my redirected port. If you use a SUID tredir and
  1692.   just redirect the smtp port (25), you do not need to define this.
  1693.  
  1694.   This should be enough to get you going. If you decide to use sendmail,
  1695.   the principles are the same but the details differ.  Ronald Florence
  1696.   (ron@mlfarm.com) told me that the stock Sun sendmail will not send
  1697.   multiple queued messages over a redirected port; BSD sendmail 8.6.9
  1698.   works fine.  He made the following changes to '/etc/sendmail.cf' to
  1699.   get it working with TERM. In his case, the default sendmail port (25)
  1700.   is used for SMTP traffic over a local ethernet so Internet mail is
  1701.   forwarded to a redirected TCP port.
  1702.  
  1703.  
  1704.     #
  1705.     #Create the termsmtp mailer, which sends mail via a re-directed TCP port
  1706.     #
  1707.     Mtermsmtp,P=[TCP], F=mDFMuCXe, S=22, R=22, A=TCP $h PORTNUMBER
  1708.  
  1709.  
  1710.  
  1711.   Here, PORTNUMBER is the number of the redirected port on the local
  1712.   machine. This should be an unused port over 2000. We next tell
  1713.   sendmail which machine to connect to, and set termsmtp as the default
  1714.   mailer.
  1715.  
  1716.  
  1717.     #
  1718.     # major relay mailer
  1719.     #
  1720.     DMtermsmtp
  1721.     #
  1722.     # major relay host: use the $M mailer to send mail to other domains
  1723.     #
  1724.     DR HOSTNAME
  1725.     CR HOSTNAME
  1726.  
  1727.  
  1728.  
  1729.   Here HOSTNAME is the name of your local host (does localhost work?).
  1730.   The last entry goes under Rule 0 to forward Internet mail.
  1731.  
  1732.  
  1733.     # Pass other valid names up the ladder to our forwarder
  1734.     R$*<@$*.$+>$*         $#$M    $@$R $:$1<@$2.$3>$4     user@any.domain
  1735.  
  1736.  
  1737.  
  1738.   When the TERM connection is established to the Internet host, run the
  1739.   following commands on the local machine.
  1740.  
  1741.  
  1742.     tredir PORTNUMBER internet.host:25
  1743.     /usr/lib/sendmail -q
  1744.  
  1745.  
  1746.  
  1747.   We now turn to receiving electronic mail using TERM. We will assume
  1748.   that mail is sent to your account on the network machine mailhost. The
  1749.   simplest solution is to just use trsh or termtelnet to log on to
  1750.   mailhost and read your mail on there. However, it is also possible to
  1751.   have your mail automatically downloaded to your local machine. One way
  1752.   to do this is to use the Post Office Protocol, (POP). POP was designed
  1753.   for exactly this purpose: to deliver mail to machines that have
  1754.   intermittent network connections. To use POP, you must have a POP
  1755.   server installed on mailhost. Assuming that you do, you can then use a
  1756.   POP client to download your mail every few minutes. This is done, as
  1757.   you might expect, using tredir. The POP service is 110 (note that
  1758.   there is an older protocol, POP-2, which uses port 109; in this
  1759.   document we describe POP-3, which is the latest version of POP). There
  1760.   are several POP clients available. One, written in the script language
  1761.   perl is pop-perl-1.X, written by William Perry and maintained by
  1762.   myself - it can be found on sunsite.unc.edu:pub/Linux/system/Mail.
  1763.  
  1764.   To use POP, you redirect a local port to port 110 on mailhost and
  1765.   configure your client to retrieve your mail from localhost using the
  1766.   local port. As an example, we will assume that there is a POP server
  1767.   running on mailhost. We will redirect the local port 2110, and fire up
  1768.   the pop-perl client:
  1769.  
  1770.  
  1771.     $ tredir 2110 mailhost:110
  1772.     Redirecting 2110 to mailhost:110
  1773.     $ pop
  1774.     Username: bill
  1775.     Password: <enter your password for mailhost>
  1776.     Pop Host: name of local
  1777.     Pop Port: 2110
  1778.     Starting popmail daemon for bill
  1779.  
  1780.  
  1781.  
  1782.  
  1783.   If you do not have a POP server available, the BCRMailHandler package
  1784.   has a program to download your mail over a TERM link to your local
  1785.   machine. I have not used it, but anyone who has is welcome to comment.
  1786.   You can also use the term.mailerd+smail package for this purpose.
  1787.   Alas, both BCRMailHandler and the term.mailerd.smail package do not
  1788.   work anymore with TERM versions 2.0.0 and higher.
  1789.  
  1790.  
  1791.   8.  tudpredir
  1792.  
  1793.  
  1794.   tudpredir is similar to tredir when you look at what these programs do
  1795.   and how they are executed. The big difference between the two programs
  1796.   is that tredir is used to redirect TCP network services while
  1797.   tudpredir redirects UDP (User Datagram Protocol) network services over
  1798.   the TERM link. One more important difference between the two programs
  1799.   is that tredir becomes a background daemon once it has successfully
  1800.   established the local port, while tudpredir commands must be placed in
  1801.   the background manually.
  1802.  
  1803.   The common command format of tudpredir is:
  1804.  
  1805.  
  1806.     tudpredir [this_computer:]port [that_computer:]port
  1807.  
  1808.  
  1809.  
  1810.  
  1811.   9.  Automating Things
  1812.  
  1813.  
  1814.  
  1815.   Now that you know how to get all your network services over TERM, it
  1816.   would be nice to set things up in such a way that your link is set up
  1817.   and configured automatically. There are basically an infinite number
  1818.   of ways of doing so, depending on what communication program you use
  1819.   and how you log in to your remote system.
  1820.  
  1821.   One program that I have not used, but I have heard is quite nice, is
  1822.   fet: a front end for TERM. It is designed to log you into a remote
  1823.   system and fire up TERM and all your tredir's.  Any comments on fet
  1824.   would be most welcome.
  1825.  
  1826.   I shall now give an example of a set of commands that use kermit to
  1827.   log into the remote system and then performs all of the TERM
  1828.   initializations. Obviously, if you use these examples, you will have
  1829.   to modify them for your own login procedures.
  1830.  
  1831.   The command which is actually invoked is the shell script 'knet',
  1832.   given by:
  1833.  
  1834.  
  1835.  
  1836.     #!/bin/sh
  1837.     /usr/bin/kermit -y $HOME/.kerm_term > $HOME/klog < /dev/null 2>& 1
  1838.     exec $HOME/bin/tstart >> $HOME/klog 2>& 1
  1839.  
  1840.  
  1841.  
  1842.   The script '.kerm_term' is given by:
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.     pause 2
  1850.     # The number you want to dial
  1851.     output atdtXXXXXXX \13
  1852.     # Login to the terminal server
  1853.     input 145 {name: }
  1854.     output MYNAME \13
  1855.     input 3 {word: }
  1856.     output MYPASSWORD \13
  1857.     input 5 {xyplex>}
  1858.     # Make the line transparent
  1859.     output term telnet-t \13
  1860.     output term stopb 1 \13
  1861.     # Connect to the remote host
  1862.     output telnet remotehost.somedomain.org \13
  1863.     input 10 {ogin: }
  1864.     output MYOTHERNAME \13
  1865.     input 3 word:
  1866.     output MYOTHERPASSWORD \13
  1867.     pause 5
  1868.     # Fire up term on the remote host
  1869.     output exec term -s 38400 -l $HOME/tlog -w 10 -t 150  \13
  1870.     ! /usr/bin/term -r -l $HOME/tlog -s 38400 -c off -w 10 -t 150 < /dev/modem  > /dev/modem &
  1871.     # Open other clients here
  1872.     suspend
  1873.     !killall -KILL term
  1874.  
  1875.  
  1876.  
  1877.   and finally, the script 'tstart' which fires up the TERM clients is
  1878.   given by
  1879.  
  1880.  
  1881.  
  1882.     #!/bin/sh
  1883.     #
  1884.     # This lets mail get out, can read news here, can pick up my mail here
  1885.     #
  1886.     /usr/local/bin/tredir 2025 25 2119 newshost:119 2110 pophost:110
  1887.     #
  1888.     # So I can open up Xwindows here
  1889.     #
  1890.     /usr/local/bin/trsh -s txconn
  1891.     #
  1892.     # So I will receive mail....
  1893.     #
  1894.     /usr/local/bin/pop
  1895.     #
  1896.     # Clean out the queue, in case of boo-boos
  1897.     #
  1898.     /usr/bin/runq
  1899.     #
  1900.     # Done now
  1901.     #
  1902.     echo ^G^G > /dev/console
  1903.  
  1904.  
  1905.  
  1906.   When finally you want to close the connection, you resume and
  1907.   terminate kermit. The last line of the script kills the local TERM and
  1908.   returns the system in its initial state.
  1909.  
  1910.   ( Note of the author: instead of doing '!killall -KILL term', I think
  1911.   it should be possible just to do '!tshutdown'. This should also work?)
  1912.  
  1913.   As I said, there are zillions of ways to do so; these are just meant
  1914.   as examples to get you started. Other examples can be found in the
  1915.   packages autoterm and JoelTermStuff.
  1916.  
  1917.  
  1918.   10.  Porting software for use with TERM
  1919.  
  1920.  
  1921.   In principle, all programs that can be used over a network can also be
  1922.   used in combination with TERM. Some of them you can get as binaries
  1923.   with TERM support already built in. These include telnet, (nc)ftp,
  1924.   Mosaic and many others. Most of these programs are compiled for TERM
  1925.   1.17 or earlier. They should, however, still work with the newer
  1926.   versions of TERM.
  1927.  
  1928.   Another way to make programs TERM aware is to port them yourself. This
  1929.   process will be described in the next subsection.
  1930.  
  1931.   The last way to make your programs TERM-aware is to termify them.
  1932.  
  1933.  
  1934.   10.1.  Port and compile the sources
  1935.  
  1936.  
  1937.   Porting software to TERM can be done using a fairly simple porting
  1938.   procedure:
  1939.  
  1940.   If installed in '/usr/local' by root:
  1941.  
  1942.  
  1943.   1. Add to the compile flags -include /usr/local/include/termnet.h
  1944.  
  1945.   2. and add to the library list -ltermnet
  1946.  
  1947.   If installed in your home directory:
  1948.  
  1949.  
  1950.   1. Add to the compile flags -include $HOME/term/termnet.h
  1951.  
  1952.   2. and add to the library list -L$HOME/term -ltermnet
  1953.  
  1954.   Now compile the software as described in the INSTALL or README
  1955.   document that came with the software. That should do!
  1956.  
  1957.   At this point the commands should work both with and without TERM.
  1958.  
  1959.  
  1960.     telnet localhost
  1961.  
  1962.  
  1963.  
  1964.   does not use TERM to connect, but
  1965.  
  1966.  
  1967.     telnet bohr.physics.purdue.edu
  1968.  
  1969.  
  1970.  
  1971.   will use TERM only if you do not have some other type of network
  1972.   connection.
  1973.  
  1974.   Some commands like rlogin can only be executed by root and the owner
  1975.   of the TERM connection (privileged persons).
  1976.  
  1977.   Some TERM commands will be TERM transparent and only use TERM when
  1978.   there is not another option. Some common examples are telnet and ftp.
  1979.  
  1980.  
  1981.   Others require an external flag to tell them it is all right to use
  1982.   TERM. These programs include xarchie, fsp and ytalk.
  1983.  
  1984.   You can either flag these programs to use TERM by setting the
  1985.   environmental variable TERMMODE as specified in README.security, or
  1986.   running make installnet. Eventually, the 'termnet' file created will
  1987.   contain special networking instructions, but for now only its
  1988.   existence is checked.
  1989.  
  1990.   If you add an ethernet connection, you can then simply remove the
  1991.   'termnet' file and continue to use the same binaries!
  1992.  
  1993.   NOTE: Programs that were ported back in the days of client.a, can
  1994.   still be recompiled for use with newer versions of TERM simply by
  1995.   changing the client.a reference to libtermnet.a.
  1996.  
  1997.  
  1998.   10.2.  Termify
  1999.  
  2000.  
  2001.   This package will convert dynamically linked binaries for TERM use.
  2002.  
  2003.   Before you can use termify you have to make sure that you have TERM
  2004.   version 2.2i (is this version 2.2.8?) or later and libc.so.4.5.26 or
  2005.   later. Then you have to create the file 'libt.so.4' in the directory
  2006.   '/lib' (see the README file in the package).
  2007.  
  2008.   Problem at this moment is that you have to remake the file 'libt.so.4'
  2009.   every time you upgrade TERM versions.
  2010.  
  2011.   After you have created the library you can let termify 'crunch' the
  2012.   program you want to make TERM-aware, by using the command:
  2013.  
  2014.  
  2015.     termify <command name>
  2016.  
  2017.  
  2018.  
  2019.   When you do not like the result you can 'un'termify the program you
  2020.   have just termified using the command:
  2021.  
  2022.  
  2023.     termify -u <command name>
  2024.  
  2025.  
  2026.  
  2027.   Last, the package also contains a script for completely termifying
  2028.   'smail'; so no special transport definitions are necessary. The only
  2029.   thing you possibly want to change is the 'From: ' address.
  2030.  
  2031.  
  2032.   11.  Term clients
  2033.  
  2034.  
  2035.  
  2036.   11.1.  Term clients available on ftp sites.
  2037.  
  2038.  
  2039.   Below a list of application running with TERM is given. I am not
  2040.   stating that this list is complete; so any completion is welcome. As
  2041.   far as possible I will present the site and directory where the
  2042.   application can be found (all to my knowledge). When I state
  2043.   sunsite.unc.edu as the place to find the application I mean that you
  2044.   can find it in one of the following two directories:
  2045.  
  2046.  
  2047.   1. /pub/Linux/apps/comm/term/apps
  2048.  
  2049.   2. /pub/Linux/apps/comm/term/extra
  2050.  
  2051.   Here we go :-)
  2052.  
  2053.   TERM package:
  2054.  
  2055.  
  2056.  
  2057.        tupload
  2058.        tdownload           (versions 2.1.0 and higher)
  2059.        trsh
  2060.        tmon
  2061.        tredir
  2062.        tudpredir           (versions 2.0.0 and higher)
  2063.        txconn
  2064.        trdate(d)
  2065.        tshutdown
  2066.        libtermnet
  2067.  
  2068.  
  2069.  
  2070.  
  2071.   File transfer:
  2072.  
  2073.  
  2074.  
  2075.        ftpd                sunsite.unc.edu
  2076.        termncftp           sunsite.unc.edu
  2077.        ncftp185            sunsite.unc.edu:/pub/Linux/system/Network/file-transfer
  2078.        fsp                 sunsite.unc.edu:/pub/Linux/system/Network/file-transfer
  2079.  
  2080.  
  2081.  
  2082.  
  2083.   Information systems:
  2084.  
  2085.  
  2086.  
  2087.        lynx
  2088.        Mosaic              sunsite.unc.edu:/pub/Linux/system/Network/info-systems/Mosaic
  2089.        chimera
  2090.        netscape            sunsite.unc.edu:/pub/Linux/system/Network/info-systems
  2091.        httpd
  2092.        xgopher
  2093.        gopher              sunsite.unc.edu
  2094.  
  2095.  
  2096.  
  2097.  
  2098.   Remote login:
  2099.  
  2100.  
  2101.  
  2102.        termtelnet          sunsite.unc.edu
  2103.        rlogin              physics.purdue.edu:/pub/bcr/term/extra
  2104.        rsh                 physics.purdue.edu:/pub/bcr/term/extra
  2105.  
  2106.  
  2107.  
  2108.  
  2109.   Netnews:
  2110.  
  2111.  
  2112.  
  2113.   tin 1.3             sunsite.unc.edu:/pub/Linux/system/Mail/news
  2114.   news2               sunsite.unc.edu
  2115.  
  2116.  
  2117.  
  2118.  
  2119.   Mail:
  2120.  
  2121.  
  2122.  
  2123.        slurp               sunsite.unc.edu
  2124.        smail               sunsite.unc.edu
  2125.        term.mailerd+smail  sunsite.unc.edu
  2126.        BCRMailHandlerXXX   physics.purdue.edu:/pub/bcr/term
  2127.  
  2128.  
  2129.  
  2130.  
  2131.   Automating scripts:
  2132.  
  2133.  
  2134.  
  2135.        JoelTermStuff       sunsite.unc.edu
  2136.        autoterm            sunsite.unc.edu
  2137.        fet                 sunsite.unc.edu
  2138.  
  2139.  
  2140.  
  2141.  
  2142.   Other programs:
  2143.  
  2144.  
  2145.  
  2146.        inetd               sunsite.unc.edu
  2147.        rdate               sunsite.unc.edu
  2148.        xgospel             sunsite.unc.edu:/pub/Linux/games/x11/networked
  2149.        termify             physics.purdue.edu:/pub/bcr/term/extra
  2150.        xboard              sunsite.unc.edu
  2151.        ircII               sunsite.unc.edu:/pub/Linux/system/Network/chat
  2152.        whois
  2153.        xwebster            sunsite.unc.edu
  2154.        sxpc                ftp.x.org:/R5contrib
  2155.        xztalk              sunsite.unc.edu:/pub/Linux/apps/sound/talk
  2156.  
  2157.  
  2158.  
  2159.  
  2160.  
  2161.   11.2.  The termnet package
  2162.  
  2163.  
  2164.   The package termnet-2.0.4-Linux-bin.tar.gz
  2165.   (sunsite.unc.edu:/pub/Linux/apps/comm/term) contains a couple of pre-
  2166.   compiled TERM clients and a couple of scripts, manual pages and
  2167.   libtermnet.so.2.00.04. The clients are compiled using this version of
  2168.   libtermnet.so. The package contains the following clients:
  2169.  
  2170.  
  2171.  
  2172.        fet         perl        sperl4.036  tmon        tshutdown   xgopher
  2173.        finger      perl4.036   suidperl    trdate      tudpredir   ytalk
  2174.        ftp         rcp         taintperl   trdated     tupload
  2175.        fwhois      rlogin      telnet      tredir      txconn
  2176.        ncftp       rsh         term        trsh        xarchie
  2177.  
  2178.  
  2179.   WARNING: The package also contains the complete set of compiled
  2180.   clients of TERM 2.0.4 including TERM itself. Do not install this
  2181.   package before you are sure about what you want. You will destroy
  2182.   other versions of TERM and its clients when you start moving
  2183.   executables around.
  2184.  
  2185.  
  2186.   11.3.  Asked for but not yet supported
  2187.  
  2188.  
  2189.  
  2190.   1. DOOM: The problem with this game seems to be the fact that it uses
  2191.      port 5029 both as client and as server.
  2192.  
  2193.   2. NFS: The NFS server is only supposed to accept requests if the
  2194.      socket requesting the connection is bound to a port below 1024.
  2195.      This seems to be troublesome. However, some NFS servers have an
  2196.      'insecure' option.  In this case NFS might work eventually, if RPC
  2197.      support is added to Term.
  2198.  
  2199.  
  2200.   12.  Term and Security
  2201.  
  2202.  
  2203.   In this section I will point to some security aspects of TERM. The
  2204.   problems will be explained and a way to improve security will be
  2205.   given.
  2206.  
  2207.  
  2208.   12.1.  trsh
  2209.  
  2210.  
  2211.   Trsh is insecure when it is used to access the local Linux box from
  2212.   the remote system. The problem with TERM and its clients is that
  2213.   beside the owner of the TERM connection also 'root' can execute TERM-
  2214.   aware programs over the connection.
  2215.  
  2216.   This also means that 'root' on the remote system can execute trsh and
  2217.   thus can enter the login which owns the TERM connection quite easy. If
  2218.   this owner on the local box is 'root' then you will be in hell.
  2219.  
  2220.   The solution to this problem is easy: you just have to put the
  2221.   following line in the termrc file on the local box:
  2222.  
  2223.  
  2224.     denyrsh on
  2225.  
  2226.  
  2227.  
  2228.   With this set in the 'termrc' file, nobody can use trsh on the remote
  2229.   site anymore to access your machine. When you and others want to
  2230.   access your local Linux box over the TERM connection this can still be
  2231.   done using telnet and redirected ports.
  2232.  
  2233.  
  2234.   12.2.  txconn and xauth
  2235.  
  2236.  
  2237.   Txconn is not terribly secure; anyone can connect to your local server
  2238.   via TERM and perform all sorts of mischief. I you are worried about
  2239.   this sort of thing, it might be a good idea to consider using xauth to
  2240.   authorize your connections. See the next section for an example of
  2241.   using xauth for securing your connections.
  2242.  
  2243.  
  2244.  
  2245.   12.3.  sxpc, xhost and xauth
  2246.  
  2247.  
  2248.   Sxpc in combination with 'xhost +' is very dangerous when you are not
  2249.   using xauth.
  2250.  
  2251.   Using xauth is very important to maintaining security when using sxpc.
  2252.   If you do not use xauth when using sxpc all the dangers of running
  2253.   with 'xhost +' apply. These dangers include but are not limited to:
  2254.  
  2255.  
  2256.   o  Someone watching what is displayed on your screen
  2257.  
  2258.   o  Someone watching what you type
  2259.  
  2260.   o  Someone typing in one of your windows (for example: a command to
  2261.      delete all your files :-(
  2262.  
  2263.   Xauth is available in X releases R4 and later. Here I will describe
  2264.   how to set up basic usage of xauth.  This configuration is vulnerable
  2265.   to network snooping, but if you can live with that it should be fine.
  2266.  
  2267.   NOTE: when using xauth your $DISPLAY variable must NOT be set to
  2268.   localhost (or localhost:whatever). If your $DISPLAY variable does use
  2269.   localhost the clients will be unable to find the appropriate
  2270.   authorization information. The workaround is to use the real hostname
  2271.   of the machine. If you follow the compilation instructions in the
  2272.   README, and compile without -DNOGETHOSTNAME then everything should
  2273.   work.
  2274.  
  2275.   The machine where you will be running clients will be called C, the
  2276.   machine where you wish to display them will be called D.
  2277.  
  2278.   First choose a 'key', up to 16 pairs of hexadecimal digits (so an even
  2279.   number of characters from the ranges 0-9 and a-f).  You will need to
  2280.   supply this key in place of <key> in the example below.
  2281.  
  2282.   On C:
  2283.  
  2284.  
  2285.     % xauth
  2286.     xauth:  creating new authority file $HOME/.Xauthority
  2287.     Using authority file $HOME/.Xauthority
  2288.     xauth> add Chostname:8 MIT-MAGIC-COOKIE-1 <key>
  2289.     xauth> exit
  2290.  
  2291.  
  2292.  
  2293.   On D:
  2294.  
  2295.  
  2296.     % xauth
  2297.     xauth:  creating new authority file $HOME/.Xauthority
  2298.     Using authority file $HOME/.Xauthority
  2299.     xauth> add Dhostname/unix:0 MIT-MAGIC-COOKIE-1 <key>
  2300.     xauth> add Dhostname:0 MIT-MAGIC-COOKIE-1 <key>
  2301.     xauth> exit
  2302.  
  2303.  
  2304.  
  2305.   When starting the X server on D you should give the flag -auth
  2306.   $HOME/.Xauthority.  You may need to edit or create a
  2307.   '$HOME/.xserverrc' to control how the X server is started.  For
  2308.   example:
  2309.  
  2310.  
  2311.     #!/bin/sh
  2312.     exec X  -auth $HOME/.Xauthority $*
  2313.  
  2314.  
  2315.  
  2316.   Make sure that your '.Xauthority' file is readable only by you on both
  2317.   C and D.
  2318.  
  2319.  
  2320.   13.  Things to remember
  2321.  
  2322.  
  2323.   In this section I try to present you with a list of useful ftp
  2324.   addresses, URL's etc. where you can find software and information
  2325.   about TERM.
  2326.  
  2327.   Ftp:
  2328.  
  2329.  
  2330.   sunsite.unc.edu:/pub/Linux/apps/comm/term/<whole-directory-tree>
  2331.   sunsite.unc.edu:/pub/Linux/docs/HOWTO/<whole-directory-tree>
  2332.   physics.purdue.edu:/pub/bcr/term/<whole-directory-tree>
  2333.  
  2334.  
  2335.  
  2336.   URL:
  2337.  
  2338.  
  2339.   http://sunsite.unc.edu/mdw/HOWTO/Term-HOWTO.html
  2340.   http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html  (always the newest version)
  2341.   http://physics.purdue.edu/~bcr/homepage.html
  2342.  
  2343.  
  2344.  
  2345.   Netnews:
  2346.  
  2347.  
  2348.   comp.os.linux.announce           announce of new TERM versions and Term-HOWTO
  2349.   comp.os.linux.help               ask your questions about TERM here
  2350.   comp.os.linux.misc               or here
  2351.   comp.protocols.misc              answers to TERM questions are also posted here.
  2352.  
  2353.  
  2354.  
  2355.   Related documents:
  2356.  
  2357.  
  2358.   Using Term to Pierce an Internet Firewall HOWTO    by Barak Pearlmutter,
  2359.                                                         bap@learning.scr.siemens.com
  2360.   Firewall HOWTO                                     by David Rudder,
  2361.                                                         drig@execpc.com
  2362.   Serial HOWTO                                       by Greg Hankins,
  2363.                                                         gregh@cc.gatech.edu
  2364.   Net-2/Net-3 HOWTO                                  by Terry Dawson,
  2365.                                                         terryd@extro.ucc.su.oz.au
  2366.  
  2367.  
  2368.  
  2369.   When you start asking questions on netnews please make sure that you
  2370.   give people in the groups as much information as they need to solve
  2371.   your problem (TERM version number, way you set up your connection
  2372.   etc.). At this moment many TERM versions are in use and all have their
  2373.   specific and common problems. Therefore, when you want a useful
  2374.   answer, at least state the version of TERM you are using. Otherwise,
  2375.   in some cases only wild guesses are possible to help you solve your
  2376.   problems.
  2377.   14.  Reliability of TERM versions
  2378.  
  2379.  
  2380.   Many versions of TERM are around now. The maintainer of TERM, Bill
  2381.   Riemers, has made a list of TERM versions stating what versions are
  2382.   reliable and what versions you had better avoid. This list is the
  2383.   following:
  2384.  
  2385.  
  2386.  
  2387.                term110          --> cannot really say
  2388.                term111          --> cannot really say
  2389.                term112          --> cannot really say
  2390.                term113          --> cannot really say
  2391.                term114          --> fairly stable BETA version
  2392.                term115          --> unstable BETA version
  2393.                term116          --> unstable BETA version
  2394.                term117          --> unstable BETA version
  2395.                term118          --> semi-stable BETA version
  2396.                term119          --> stable GAMMA version
  2397.                term-2.0.X       --> semi-stable BETA versions
  2398.                term-2.1.X       --> more stable BETA versions
  2399.                term-2.2.X       --> new BETA versions
  2400.                term-2.3.X       -->
  2401.  
  2402.  
  2403.  
  2404.  
  2405.  
  2406.  
  2407.   15.  Term speed table
  2408.  
  2409.  
  2410.   Thanks to Bill McCarthy we now have a table with TERM speed
  2411.   information for different modems, TERM versions and connection
  2412.   conditions. Its purpose is to give new and experienced users some idea
  2413.   what other people are using and the results they are getting.
  2414.  
  2415.  
  2416.  
  2417.  
  2418.  
  2419.  
  2420.  
  2421.  
  2422.  
  2423.  
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.                              LINUX TERM CHART 8/14/94
  2444.  
  2445.  
  2446.   |___modem speed/make___|___line speed__|__avg cps__|__high__|__term ver_|
  2447.   | 1)  USR SP 14.4      |   9600        |  950      |  963   | 1.17      |
  2448.   | 2)  USR SP 14.4      |  14400        | 1376      |  n/a   | 1.18p06   |
  2449.   | 3)  Zoom 2400        |   2400        |  220      |  230   | 1.19      |
  2450.   | 4)  Boca V.32bis 14  |  57600        | 1400      |  n/a   | 1.01/09?  |
  2451.   | 5)  Viva 14.4        |  14400        | 1300      |  n/a   | 1.16      |
  2452.   | 6)  USR SP 14.4      |  14400+       | 1550      | 1680   | 1.19      |
  2453.   | 7)  Intel 14.4 Fax   |  14400        | 1400      | 1650   | 2.0.4     |
  2454.   | 8)  cable tv hookup  |  57600        | 1500      | 1800   | 1.18p06   |
  2455.   | 9)  Twincom 144/DFi  |  57600        | 1500      | 4000?  | 2.0.4     |
  2456.   | 10) USR SP 14.4      |  14400        | 1200      | 1500   | 1.08      |
  2457.   | 11) cable tv hookup  |  19200        | 1300      | 1800   | 1.19      |
  2458.   |-----------------------------------------------------------------------|
  2459.  
  2460.   +Command flags/termrc settings:
  2461.  
  2462.   1) default escapes   2) window 5       3) baudrate 2400    4) n/a
  2463.      baudrate 9600        timeout 200       window 3
  2464.      window 10                              noise on
  2465.      timeout 150
  2466.  
  2467.   5) compress off      6) baudrate 19200  7) ignore 19+17    8) compress off
  2468.      window 10            compress on        window 4           escape 0, 13,
  2469.      timeout 150                             timeout 90         16-19, 255
  2470.      baudrate 38400                                             baudrate 0
  2471.                                                                 shift 224
  2472.                                                                 flowcrtl 500
  2473.                                                                 window 10
  2474.                                                                 timeout 70
  2475.                                                                 retrain on
  2476.                                                                 breakout 24
  2477.   9) compress off     10) compress off      11) baudrate 19200
  2478.      baudrate 57600       baudrate 38400        compress on
  2479.      window 10            escape 17, 19         shift 224
  2480.      timeout 200          remote                escape 0, 13 16-17
  2481.      noise on                                   19, 255
  2482.      share on                                   window 10
  2483.      remote                                     timeout 40
  2484.  
  2485.   Escaping characters at one end also implies ignoring them on the other end.
  2486.  
  2487.  
  2488.  
  2489.  
  2490.  
  2491.   16.  Hints and Tricks found on the net
  2492.  
  2493.  
  2494.   In the Linux related newsgroups many questions about TERM are coming
  2495.   back every couple of weeks, together with the answers to these
  2496.   questions. To reduce traffic to the newsgroup, in this section I shall
  2497.   try to make a composition of these questions and the answers to them.
  2498.   Some of the answers have been checked by me as I also had related
  2499.   problems. Others, I have just taken from the newsgroups without
  2500.   testing them.
  2501.  
  2502.  
  2503.   o  Many people, especially those who are using Ultrix, seem to have
  2504.      trouble with vi presenting less than 24 lines on a window with 24
  2505.      lines. There are three ways to get rid of this problem:
  2506.  
  2507.  
  2508.  
  2509.      1. Log in into the remote system using:
  2510.  
  2511.           trsh -s telnet <hostname>
  2512.  
  2513.  
  2514.  
  2515.      2. Put 'resize; clear' in your '.login' file
  2516.  
  2517.      3. The best solutions seems to be to enter the following remote:
  2518.  
  2519.           stty 38400
  2520.  
  2521.  
  2522.  
  2523.   o  Many people seem to have problems with crashing TERM connections,
  2524.      whatever may be the reason of the crashes. So before starting
  2525.      applications people want to know whether their TERM connection is
  2526.      still alive or not. This can be checked using the following small
  2527.      shell script examples:
  2528.  
  2529.      When you are using tcsh:
  2530.  
  2531.  
  2532.        if ( { trsh -s true } ) then
  2533.          ...
  2534.        endif
  2535.  
  2536.  
  2537.  
  2538.   When you are using bash:
  2539.  
  2540.  
  2541.     if trsh -s true; then
  2542.       ...
  2543.     fi
  2544.  
  2545.  
  2546.  
  2547.   o  The WWW browser Netscape is causing people problems to get it to
  2548.      work with TERM. The good news is that it will work under TERM. Here
  2549.      is how:
  2550.  
  2551.  
  2552.              1. Termify netscape
  2553.              2. Fire up termnetscape
  2554.                    under Options | Preferences | Mail/Proxys
  2555.                    leave _all_ of the proxy boxes blank
  2556.                    set the SOCKS box to 'remotehost' & 80
  2557.              3. Ignore the error you get when you exit the Options menu.
  2558.              4. If termnetscape fails to work right:
  2559.                    under Options | Preferences | Mail/Proxys
  2560.                    leave _all_ of the proxy boxes blank
  2561.                    set the SOCKS box to 'none' & 80
  2562.              5. Ignore the error you get when you exit the Options menu.
  2563.  
  2564.  
  2565.  
  2566.   Scott Blachowicz mailed me stating that it is even easier to get
  2567.   Netscape or any other browser to work with TERM if you have a proxy
  2568.   server (e.g. CERN's httpd) installed for use on the remote side of
  2569.   your TERM link. On the local side, you can then do this:
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575.           1. tredir localhost:8080 remotehost:80
  2576.  
  2577.                 where 'remotehost' is the hostname of your proxy server system.
  2578.  
  2579.           2. Run your particular browser, then in the preferences or options or
  2580.                 whatever it is called, point your proxies at 'localhost' port
  2581.                 8080.
  2582.                 Some browsers might like environment variables like
  2583.  
  2584.                     export http_proxy=http://localhost:8080/
  2585.                     export ftp_proxy=http://localhost:8080/
  2586.  
  2587.  
  2588.  
  2589.  
  2590.   17.  Other Things
  2591.  
  2592.  
  2593.   Some things that might be included:
  2594.  
  2595.  
  2596.   o  Extension of troubleshooting
  2597.  
  2598.   o  Extension of security issues
  2599.  
  2600.   o  Termwrap
  2601.  
  2602.   o  Suggestions
  2603.  
  2604.   Anyway, if you have suggestions, criticism, suggestions, or anything
  2605.   else to say about this document, please fire away. At the moment I,
  2606.   Patrick Reijnen, have taken over the authorship of the TERM-HOWTO. I
  2607.   can (currently) be reached at patrickr@bart.nl.
  2608.  
  2609.  
  2610.   18.  Acknowledgements
  2611.  
  2612.  
  2613.   A lot of people have to be thanked. First and foremost Michael
  2614.   O'Reilly and all the developers of TERM, who have provided us with
  2615.   such a great tool. I would also like to thank everyone who gave
  2616.   feedback and contributed to this HOWTO. They include Bill Reynolds,
  2617.   the former author of this HOWTO, Ronald Florence, Tom Payerle, Bill C.
  2618.   Riemers, Hugh Secker-Walker, Matt Welsh, Bill McCarthy, Sergio, Weyman
  2619.   Martin and everybody I forgot to mention.
  2620.